package com.shop.controller;

import cn.hutool.jwt.JWTUtil;
import com.shop.dto.*;
import com.shop.service.AddressService;
import com.shop.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author wzby
 * @date 2022-12-02 13:24:15
 */
@RestController
@RequestMapping("/member-api/address")

public class AddressController {


    @Autowired
    private AddressService addressService;


    @PostMapping("")
    public Integer insert(@RequestBody AddressDto addressDto) {
        return addressService.insert(addressDto);
    }

    @GetMapping("")
    public List<AddressDto> select(AddressQueryDto addressQueryDto) {
        return addressService.select(addressQueryDto);
    }

}
